package com.hrt;

import com.hrt.mapper.DeptMapper;
import com.hrt.mapper.EmpMapper;
import com.hrt.pojo.Dept;
import com.hrt.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * @Auther: hrt
 * @Date: 2021/10/14
 * 模糊查询与主键自增
 */
public class LikeselectTest {
    public static void main(String[] args) {
        SqlSession sqlSession = SqlSessionUtil.getSqlSession();
        EmpMapper empMapper = sqlSession.getMapper(EmpMapper.class);
        System.out.println(empMapper.findByEname("BLAKE"));

        DeptMapper mapper = sqlSession.getMapper(DeptMapper.class);
        Dept d=new Dept(null, "145555", "1235");
        int i = mapper.addDept(d);
        System.out.println(d.getDeptno());
        sqlSession.close();


    }
}
